<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/float/float_white_list.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/float/float_white_list.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'float_list_id',
                footer: "Foots",
                cnName: '流程白名单模板',
                name: 'float/float_white_list',
                url: "/float_white_list/",
                sortName: "float_list_id"
            });
            const editFormFields = ref({"float_id":"","float_node_id":"","user_id":""});
            const editFormOptions = ref([[{"dataKey":"流程列表","data":[],"title":"流程","field":"float_id","type":"select"},
                               {"dataKey":"流程节点列表","data":[],"title":"流程节点","field":"float_node_id","type":"select"}],
                              [{"dataKey":"userid对应表","data":[],"title":"维护人","field":"user_id","type":"select"}]]);
            const searchFormFields = ref({"float_id":"","float_node_id":""});
            const searchFormOptions = ref([[{"dataKey":"流程列表","data":[],"title":"流程","field":"float_id","type":"like"},{"dataKey":"流程节点列表","data":[],"title":"流程节点","field":"float_node_id","type":"like"}]]);
            const columns = ref([{field:'float_list_id',title:'float_list_id',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'Creator',title:'创建人名称',type:'string',link:true,width:100,align:'left',sort:true},
                       {field:'float_id',title:'流程',type:'string',bind:{ key:'流程列表',data:[]},sort:true,width:110,align:'left'},
                       {field:'float_node_id',title:'流程节点',type:'string',bind:{ key:'流程节点列表',data:[]},sort:true,width:110,align:'left'},
                       {field:'CreateID',title:'创建人id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'user_id',title:'维护人',type:'int',bind:{ key:'userid对应表',data:[]},sort:true,width:80,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人名称',type:'string',width:100,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true}]);
            const detail = ref({
                cnName: "流程白名单明细",
                table: "float_white_list_user",
                columns: [{field:'id',title:'id',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'float_list_id',title:'float_list_id',type:'guid',width:110,hidden:true,align:'left'},
                       {field:'user_id',title:'人员',type:'int',bind:{ key:'userid对应表',data:[]},width:110,edit:{type:'select'},align:'left',sort:true},
                       {field:'ft_table',title:'流程业务表',type:'string',width:220,hidden:true,align:'left'},
                       {field:'step_id',title:'当前步骤号',type:'int',width:110,hidden:true,align:'left'},
                       {field:'note',title:'备注',type:'string',width:220,edit:{type:'text'},align:'left'},
                       {field:'CreateID',title:'创建人id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人名称',type:'string',width:100,hidden:true,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人名称',type:'string',width:100,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'float_id',title:'流程',type:'string',width:110,hidden:true,align:'left'},
                       {field:'float_node_id',title:'流程节点',type:'string',width:110,hidden:true,align:'left'}],
                sortName: "float_list_id",
                key: "id"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
